<div class="content-table">
    <?php
        echo $this->partial('topo_list.phtml', array(
            'titulo' => 'Histórico',
        ));
    ?>
    <table id="tlist" class="tb_content">
        <thead>
            <tr>
                <th width="80px">Matrícula</th>
                <th width="80px">Data</th>
                <th>Curso</th>
                <th width="80px">Turno</th>
                <th width="80px">Turma</th>
                <th width="50px">Ano</th>
                <th width="50px">Semestre</th>
            </tr>
        </thead>
        <tbody>
            <?php
            if($this->row['ALU_ID'] > 0){ 
            $obj = new Admin_Model_DbTable_Matricula();
            $mats =  $obj->fetchAll('ALU_ID = ' . $this->row['ALU_ID']);
            foreach($mats as $mat){ 
                
                $obj2 = new Admin_Model_DbTable_Curso();
                $cur = $obj2->fetchRow('CUR_ID = ' . $mat['CUR_ID'])->toArray();
               
            ?>
                <tr>
                    <td><?php echo $mat['MAT_ID']; ?></td>
                    <td><?php echo Datetools::invertDH_D($mat['MAT_DATHOR']); ?></td>
                    <td><?php echo $cur['CUR_NOM']; ?></td>
                    <td><?php echo dominio::getTurno($cur['TUR_ID']); ?></td>
                    <td><?php echo $cur['CUR_TRM']; ?></td>
                    <td><?php echo $cur['CUR_ANO']; ?></td>
                    <td><?php echo dominio::getSemestres($cur['CUR_SEM']); ?></td>
                </tr>
            <?php }
            } ?>
        </tbody>
    </table>
</div>